﻿using BootstrapBlazor.Components;
using CodeMan.Domain.Shared;
using Microsoft.Extensions.Localization;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Application.Dtos;
using CodeMan.Entitys;

namespace CodeMan.Application.Contracts.ClassGens
{
    /// <summary>
    /// 类属性
    /// </summary>

    public class ClassAttributeDTO : EntityDto, IEntityBlazor
    {
        [AutoGenerateColumn(Order = 0, Readonly = true, Sortable = true)]
        public Int64 ClassGenId { get; set; }

        [AutoGenerateColumn(Order = 1, Sortable = true)]
        public int SortNo { get; set; }

        /// <summary>
        /// 字段名称
        /// </summary>
        [Required]
        [AutoGenerateColumn(Order = 2, Sortable = true)]
        public string AName { get; set; }

        /// <summary>
        /// 长度
        /// </summary>
        [AutoGenerateColumn(Order = 5, Sortable = true)]
        public int Length { get; set; }

        /// <summary>
        /// 默认值 
        /// </summary>
        [AutoGenerateColumn(Order = 6, Sortable = true)]
        public string defaultValue { get; set; } 

        [AutoGenerateColumn(Order = 10, Sortable = true)]
        public string ADesc { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        [AutoGenerateColumn(Order = 11, Sortable = true)]
        public AttrTypeEnum AType { get; set; }

        [AutoGenerateColumn(Order = 20, Sortable = true)]
        public bool IsShow { get; set; }


        [AutoGenerateColumn(Order = 20, Sortable = true)]
        public string IsKey { get; set; }

        [AutoGenerateColumn(Order =30, Sortable = true)]
        public bool IsAutoGenerate { get; set; }

        //public ClassGen OneClassDTO { get; set; } 

    }


}
